/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package peggame;

/**
 *
 * @author zach
 */
public class Move implements Comparable<Move>{
    int firstx;
    int lastx;
    int firsty;
    int lasty;

    public Move(int firstx, int lastx, int firsty, int lasty) {
        this.firstx = firstx;
        this.lastx = lastx;
        this.firsty = firsty;
        this.lasty = lasty;
    }

    public int compareTo(Move in){
        return
                100000*(firstx-in.firstx)
                +10000*(firsty-in.firsty)
                +1000*(lastx-in.lastx)
                +100*(lasty-in.lasty);

    }

    public String toString(){
        return " "+firsty+","+firstx+" "+lasty+","+lastx;
    }
}
